import {
  MASK_SHOW,
  MASK_CLOSE
} from '../actiontype/ActionTypes';

const initialState = {
    maskStatus:false,
    component:null
}

export default function mask(state = initialState, action) {
  switch (action.type) {
    case MASK_SHOW:
      return {
          maskStatus:true,
          component:action.component
      }
    case MASK_CLOSE:
      return {
          maskStatus:false,
          component:null
      }
    default:
      return initialState;
  }
}
